package org.zjt.auth.MQ.activemq;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.stereotype.Component;


@Component
public class ActiveMQMsgSender {
	
	@Autowired
	private JmsTemplate jmsTemplate;
	
	public void sendMsg(String str)throws Exception{
		ActiveMQMsg msg=new ActiveMQMsg();
		msg.setContext(str);
		jmsTemplate.send("zhang-test", msg);
	}
}
